Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Reading and writing object attributes
Once you have the handle to an object, you can change its appearance and behavior through its handle. To locate all the objects in the sample procedure’s frame, you start with the field group’s
FIRST-CHILD, which is now in thehObjectvariable, and walk through the chain ofNEXT-SIBLINGobjects as long as the object handle remains valid.For example, assume you want to identify each fill-in field in the frame. For each one that is an integer field, you want to disable the field and set its background color to a dark gray. For each other fill-in field, you want to set the background color to green to highlight the field for data entry.
To start with,
changeFieldslooks at theTYPEattribute of each object to see if it is aFILL-IN. If it is, then it checks theDATA-TYPEattribute to see if the field is anINTEGER. If it is, then it sets itsSENSITIVEattribute to false and itsBGCOLORattribute to 8, which represents the color gray. Otherwise, if the field is not an integer, it sets theBGCOLORattribute to 10, which is the color green:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |